package main

import "fmt"

var log Log

const (
	FILE_LOG string = "file"
	CONSLOE_LOG string = "console"
)

func InitLog() (err error){
	switch log_config.GetType() {
	case FILE_LOG:
		log , err = NewFileLog()
		if err != nil{
			err = fmt.Errorf("no this type")
			return
		}
	case CONSLOE_LOG:
		log, err = NewConsoleLog()
		if err != nil{
			err = fmt.Errorf("no this type")
			return
		}
	}
	return
}
